#include <stdio.h>
int used[10] = { 0 }, list[10] = { 0 };
int a, b, c, l = 0;

void dfs(int depth)
{
    int i;
    float q, w, e;
    if (depth == 9)
    {
        q = list[0] * 100.0f + list[1] * 10 + list[2];
        w = list[3] * 100.0f + list[4] * 10 + list[5];
        e = list[6] * 100.0f + list[7] * 10 + list[8];

        if ((float)a / b == q / w && (float)b / c == w / e)
        {
            if (l)
            {
                printf("\n%0.f %0.f %0.f", q, w, e);
            }
            else
            {
                printf("%0.f %0.f %0.f", q, w, e);
                l = 1;
            }
        }
        return;
    }
    
    for (i = 1; i <= 9; i++)
    {
        if (used[i])
            continue;

        list[depth] = i;
        used[i] = 1;
        dfs(depth + 1);
        used[i] = 0;
    }
}

int main(int argc, char const *argv[])
{
    scanf("%d%d%d", &a, &b, &c);
    dfs(0);
    if (!l)
    {
        printf("No!!!");
    }
    
    return 0;
}
